import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../pages/Home.vue'
import Tip from '../pages/tip.vue'
import User from '../pages/user.vue'
import Reg from '../pages/reg.vue'
import Login from '../pages/login.vue'
import Forget from '../pages/forget.vue'
import Search from '../pages/search.vue'
import Detail from '../pages/detail.vue'
import Banner from '../pages/banner.vue'
import XieYi from '../pages/xieyi.vue'
import YinSi from '../pages/yinsi.vue'
import Billboard from '../pages/Billboard.vue'

Vue.use(VueRouter)

const routes = [
  {
      path:"/",
      redirect:"/user"
  },
  {
    path: '/Home',
    name: 'Home',
    component: Home,
    children:[
      {
        path:"/",
        redirect:"homes"
      },
      {
        path:"homes",
        component: () => import(/* webpackChunkName: "homes" */ '../pages/home/homes.vue')
      },
      {
        path: "change",
        component: () => import(/* webpackChunkName: "list" */ '../pages/home/change.vue')
      },
      {
        path: "keep",
        component: () => import(/* webpackChunkName: "car" */ '../pages/home/keep.vue')
      },
      {
        path: "my",
        component: () => import(/* webpackChunkName: "my" */ '../pages/home/my.vue')
      },
      // {
      //   path:"banner",
      //   component:()=>import(/* webpackChunkName: "banner" */'../pages/banner.vue')
      // }
    ]
  },
  {
    path: '/tip',
    name: 'Tip',
    component: Tip,
  },
  {
    path: '/xieyi',
    name: 'XieYi',
    component: XieYi,
  }, 
  {
    path: '/yinsi',
    name: 'YinSi',
    component: YinSi,
  },
  {
    path: '/user',
    name: 'User',
    component: User,
  },
  {
    path: '/reg',
    name: 'Reg',
    component: Reg,
  }, 
  {
    path: '/forget',
    name: 'Forget',
    component:Forget ,
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
  },
  {
    path: '/search',
    name: 'Search',
    component:Search ,
  },
  {
    path: '/detail',
    name: 'Detail',
    component:Detail ,
  },
  {
    path:'/banner',
    name:'Banner',
    component:Banner,
  },
{
    path: '/Billboard',
    name: 'Billboard',
    component:Billboard ,
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
  
  
})

export default router
